package br.gov.mte.util.test.reflection.support;

import org.junit.Ignore;

/**
 * 
 * Classe responsável por realizar o suporte ao teste das chaves compostas.
 * 
 * @author osvaldeir
 * @since  28/03/2010
 *
 */
@Ignore
public class CompositeId {

	public CompositeId() {
	}

	private Integer id;

	private Long otherId;

	private String moreId;

	/**
	 * Retorna o(a) id.
	 * 
	 * @return Integer
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * Atribui o(a) id.
	 * 
	 * @param id
	 *            Integer
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * Retorna o(a) otherId.
	 * 
	 * @return Long
	 */
	public Long getOtherId() {
		return otherId;
	}

	/**
	 * Atribui o(a) otherId.
	 * 
	 * @param otherId
	 *            Long
	 */
	public void setOtherId(Long otherId) {
		this.otherId = otherId;
	}

	/**
	 * Retorna o(a) moreId.
	 * 
	 * @return String
	 */
	public String getMoreId() {
		return moreId;
	}

	/**
	 * Atribui o(a) moreId.
	 * 
	 * @param moreId
	 *            String
	 */
	public void setMoreId(String moreId) {
		this.moreId = moreId;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((moreId == null) ? 0 : moreId.hashCode());
		result = prime * result + ((otherId == null) ? 0 : otherId.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CompositeId other = (CompositeId) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (moreId == null) {
			if (other.moreId != null)
				return false;
		} else if (!moreId.equals(other.moreId))
			return false;
		if (otherId == null) {
			if (other.otherId != null)
				return false;
		} else if (!otherId.equals(other.otherId))
			return false;
		return true;
	}


}